package org.ccu.eshop.utils;


import java.sql.Connection;
import java.sql.SQLException;

import com.mchange.v2.c3p0.ComboPooledDataSource;

public class ComboPooledDataSourceUtil {
    
    private static ComboPooledDataSource dataSource = new ComboPooledDataSource();

    public static Connection getConnection(){
        Connection conn = null;
        try {
            conn = dataSource.getConnection();
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return conn;
    }

    public static void main(String[] args) {
       // System.out.println(getConnection());
        for(int i=0;i<10;i++){
           /* System.out.println(i);*/
            System.out.println(getConnection());
        }
    }

}